Skip to content

Select diagrams by SysML v2 standard view definitions; draw multiple interconnection roots - #85

Merged
Malcolmnixon merged 1 commit into
mainfrom
standard-view-defs
Nov 12, 2026
Merged

Malcolmnixon merged 1 commit into
mainfrom
standard-view-defs

Conversation

@Malcolmnixon

@Malcolmnixon Malcolmnixon commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Stacked on #83 (doc-annotation-rendering): uses its SysmlViewNode.ViewDefinitionName and the view-definition Typing edge. Merge #83 first; GitHub will retarget this PR to main.## Problem1. Views could only select a diagram type with a tool-specific render as…Diagram token or a naming convention (e.g. a view named …InterconnectionView). The standard SysML v2 way — typing the view by a standard view definition (view X : InterconnectionView { … }) — was ignored.2. An interconnection view that exposed several independent systems (expose A::**; expose B::**;) drew only the first root part def.## Spec basis (SysML 2.1 Beta 2)- 9.2.20 StandardViewDefinitions: GeneralView, InterconnectionView, ActionFlowView / StateTransitionView (specialize InterconnectionView), SequenceView, GeometryView, GridView, BrowserView.- 7.26.2: a view usage inherits the rendering (and view conditions) of its view definition.- 8.2.3.11: interconnection-view = (interconnection-element)* — a repeated list, so every exposed root is drawn.## BehaviorDiagram type selection order (DiagramTypeRouter):1. The usage's own render (asTreeDiagram, asInterconnectionDiagram, plus the tool-defined asGeneralDiagram/asStateTransitionDiagram/asActionFlowDiagram/asSequenceDiagram/asGridDiagram; Views::-qualified accepted).2. Its view definition, nearest first via Typing then Supertype edges: a definition's render, or a standard view definition (GeneralView, InterconnectionView, ActionFlowView, StateTransitionView, SequenceView, GridView, BrowserView). GeometryView is unsupported and falls through.3. Otherwise the existing, documented tool-defined name/supertype heuristic, defaulting to General View (unchanged).Interconnection: when the expose scope makes several independent composition roots relevant (not composed by another candidate, not a namespace ancestor of another), every root is drawn as its own frame, side by side in declaration order. Single-root output is unchanged; the unscoped (--auto) case is unchanged.## Recommended syntaxsysmlpackage MyDesignViews { private import StandardViewDefinitions::*; view SoftwareStructureView : GeneralView { expose MySystemA::**; expose MySystemB::**; filter not @SysML::Documentation; } view SoftwareInterconnectionView : InterconnectionView { expose MySystemA::**; expose MySystemB::**; }}Verified on ApiMark (six packages): the interconnection view draws all six systems side by side.## Validation- ./build.ps1: 2792 tests passed, 0 failed (all TFMs).- ./lint.ps1: clean (incl. reqstream --lint --enforce).- New tests: GetStrategy_ViewTypedByStandardViewDefinition_RoutesToItsNotation (all 7 defs), GetStrategy_ViewTypedByUserViewDefinition_InheritsNotationAndRendering, GetStrategy_RenderOnTypedView_OverridesViewDefinition, InterconnectionView_BuildLayout_ExposeTwoIndependentRoots_DrawsBothSideBySide (replaces the obsolete "score breaks tie between two exposed siblings" test).- Requirements: DiagramTypeRouter-StandardViewDefinition, InterconnectionViewLayoutStrategy-MultipleRoots; design/verification/user guide ("Choosing the Diagram Type") updated.

Base automatically changed from doc-annotation-rendering to main November 12, 2026 02:47
…ection roots

Route a view typed by a StandardViewDefinitions view definition
(GeneralView, InterconnectionView, ActionFlowView, StateTransitionView,
SequenceView, GridView, BrowserView), directly or through specializing
user view definitions, to its notation (SysML 9.2.20, 7.26.2). An
explicit render on the usage still wins; the name heuristic remains the
documented tool-defined fallback.

An interconnection view exposing several independent systems now draws
every root side by side (SysML 8.2.3.11) instead of only one.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Malcolmnixon
Malcolmnixon merged commit 319c1a0 into main Nov 12, 2026
9 checks passed
@Malcolmnixon
Malcolmnixon deleted the standard-view-defs branch November 12, 2026 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant